<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>JavaScript脚本</title>
		<script>
			document.write("<h3>JavaScript数据类型及typeof使用</h3>");
			var undef, width = 80, height = 20.5, fill = true;
			var undef,a="abc",b=20,c=new Date(),d=false,e=[30,4];
			var fileName = "typeof.html";
			var objecttype = new Date();
			document.write("undef类型为：" + typeof(undef) + "<br>");
			document.write("width类型为：" + typeof(width) + "<br>");
			document.write("height类型为：" + typeof(height) + "<br>");
			document.write("fill类型为：" + typeof(fill) + "<br>");
			document.write("fileName类型为：" + typeof(fileName) + "<br>");
			document.write("objecttype类型为：" + typeof(objecttype) + "<br>");
			document.write("a,e类型:"+typeof(a)+","+typeof(e));
		</script>

   <script>
// for in遍历window对象里面所有的属性
	document.write("window的属性有：<br/>");
	for(sProp in window) {
		document.write("&nbsp;&nbsp;" + sProp + "<br>");
	}
   </script>
		
<table style="text-align: center;">
	<tr>
		<td>
			<script>
				var sun = "\u263c";
				var num = prompt("请输入想打印的行数：");
				for(var i = num; i > 0; i--) {
					for(var j = 0; j < i; j++) {
						document.write("&nbsp;&nbsp;" + sun + "&nbsp;&nbsp;");
					}
					document.write("<br />")
				}
			</script>
		</td>
	</tr>
</table>
		
		<script type="text/javascript" src="js/TextJS.js">
//			外部脚本
		</script>
		
		<script type="text/javascript" charset="UTF-8">
//		JavaScript根据所在位置可以分为内部脚本和外部脚本
//		内部脚本写在script标签中
//		外部脚本写在js脚本文件中,通过script

			alert("恭喜你中奖了")
			alert("你被人整了")
			alert("想关闭这个对话框吗？")
			alert("那你可能还要点击一次")
			
			
		</script>
		
	</head>
	<body>
		<br />
		<button  name="test" value="test" onclick="javascript:alert('拜拜')" >点击这里</button>
	</body>
</html>
